package com.bds.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Readonly;
import org.nutz.dao.entity.annotation.Table;

import com.bds.portal.util.CustomTimeSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * Created by guoyu on 2017/8/11.
 */
@Table("t_template")
public class Template {
	@Id
	@Column
	private long id;
	@Column
	private String request_id;
	@Column
	private long user_id;
	@Column
	private String template_name;
	@Column
	private String url;
	@Column
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date create_time;
	@Column
	private String page_rule;
	@Column
	private String props;

	@Column("type")
	private String type;

	@Column
	private Integer max_page;
	@Column
	private Date update_time;
	private String urls;
	private String[] url_list;
	@Column
	private String title;
	@Column
	private String head;
	@Column
	private String content;
	@Column
	private String exts;
	@Column
	private Long host_id;
	@Column
	private String click_path;
	@Column
	private Integer rows;
	@Column
	private Integer columns;
	@Column
	@Readonly
	private String prid;
	@Column
	@Readonly
	private Long taskid;
	private List<TemplateDetail> detailList = new ArrayList<TemplateDetail>();

	private String tmpl;
	@Column
	private String pre_click;

	private Long pid;
	@Column
	private String isjs;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getRequest_id() {
		return request_id;
	}

	public void setRequest_id(String request_id) {
		this.request_id = request_id;
	}

	public long getUser_id() {
		return user_id;
	}

	public void setUser_id(long user_id) {
		this.user_id = user_id;
	}

	public String getTemplate_name() {
		return template_name;
	}

	public void setTemplate_name(String template_name) {
		this.template_name = template_name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@JsonSerialize(using = CustomTimeSerializer.class)
	public Date getCreate_time() {
		return create_time;
	}

	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}

	public String getPage_rule() {
		return page_rule;
	}

	public void setPage_rule(String page_rule) {
		this.page_rule = page_rule;
	}

	public Integer getMax_page() {
		return max_page;
	}

	public void setMax_page(Integer max_page) {
		this.max_page = max_page;
	}

	public Date getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getUrls() {
		return urls;
	}

	public void setUrls(String urls) {
		this.urls = urls;
	}

	public List<TemplateDetail> getDetailList() {
		return detailList;
	}

	public void setDetailList(List<TemplateDetail> detailList) {
		this.detailList = detailList;
	}

	public String getProps() {
		return props;
	}

	public void setProps(String props) {
		this.props = props;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getHead() {
		return head;
	}

	public void setHead(String head) {
		this.head = head;
	}

	public String getExts() {
		return exts;
	}

	public void setExts(String exts) {
		this.exts = exts;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Long getHost_id() {
		return host_id;
	}

	public void setHost_id(Long host_id) {
		this.host_id = host_id;
	}

	public String getTmpl() {
		return tmpl;
	}

	public void setTmpl(String tmpl) {
		this.tmpl = tmpl;
	}

	public Long getPid() {
		return pid;
	}

	public void setPid(Long pid) {
		this.pid = pid;
	}

	public String getClick_path() {
		return click_path;
	}

	public void setClick_path(String click_path) {
		this.click_path = click_path;
	}

	public Integer getRows() {
		return rows;
	}

	public void setRows(Integer rows) {
		this.rows = rows;
	}

	public String[] getUrl_list() {
		return url_list;
	}

	public void setUrl_list(String[] url_list) {
		this.url_list = url_list;
	}

	public Integer getColumns() {
		return columns;
	}

	public void setColumns(Integer columns) {
		this.columns = columns;
	}

	public String getPre_click() {
		return pre_click;
	}

	public void setPre_click(String pre_click) {
		this.pre_click = pre_click;
	}

	public String getPrid() {
		return prid;
	}

	public void setPrid(String prid) {
		this.prid = prid;
	}

	public Long getTaskid() {
		return taskid;
	}

	public void setTaskid(Long taskid) {
		this.taskid = taskid;
	}

	public String getIsjs() {
		return isjs;
	}

	public void setIsjs(String isjs) {
		this.isjs = isjs;
	}

}
